home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17814 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.5 KB

  1. Path: gaia.ns.utk.edu!mbk
  2. From: mbk@caffeine.engr.utk.edu (Matt Kennel)
  3. Newsgroups: comp.lang.java,comp.lang.c++
  4. Subject: Re: Will Java kill C++?
  5. Date: 17 Apr 1996 17:51:02 GMT
  6. Organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory
  7. Message-ID: <4l3b26$753@gaia.ns.utk.edu>
  8. References: <4ksfdr$bhh@engnews2.Eng.Sun.COM> <3172DC7C.6B3F@sdt.com> <AUSTERN.96Apr16124316@isolde.mti.sgi.com>
  9. Reply-To: kennel@msr.epm.ornl.gov
  10. NNTP-Posting-Host: caffeine.engr.utk.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Matt Austern (austern@isolde.mti.sgi.com) wrote:
  14. : In article <4l0si4$pqd@gaia.ns.utk.edu> mbk@caffeine.engr.utk.edu (Matt Kennel) writes:
  15.  
  16. : > : > >How would you have maintained C-style linkage and C++ typesafe
  17. : > : > >linkage in the same object module without changing the linker?
  18. : > 
  19. : > : > By writing a linker pre-pass program which checks for and enforces
  20. : > : > the type-safe linking rules.
  21. : > 
  22. : > : But such a program (a) would have to be rewritten for every machine
  23. : > : to which C++ was ported, and (b) would not solve the problem of what
  24. : > : name to give the linker for overloaded functions with the same name.
  25. : > 
  26. : > So?  
  27. : > 
  28. : > Eiffel and Ada and Sather compilers do it and their generics
  29. : > work like a swiss watch.
  30.  
  31. : You mean you can link together object files produced by two different
  32. : Eiffel compilers and it's guaranteed that the link will work?  If so,
  33. : that guarantee is quite new: the last time I used an Eiffel compiler,
  34. : it didn't even have such a notion as compiling a single source file
  35. : into a single object file and then linking together the resulting
  36. : object files.  The only user-visible files were the source (.e) files
  37. : and the executable.  
  38.  
  39. Of course.  That's because there is not an agreement upon even the most
  40. basic rudiments of a link representation for Eiffel, as there is for C. 
  41.  
  42. As long as operating systems will only come with linkers which are firmly
  43. stuck in C mode this will persist. 
  44.  
  45. I don't think it even makes that much sense to compile a single Eiffel
  46. source file into a single object file?  I don't even know exactly what it
  47. would mean to have a single "object" file corresponding to a single
  48. "source" file in Eiffel. 
  49.  
  50. : I certainly doubt if there's any portable way to compile part of an
  51. : Eiffel program with one Eiffel compiler and part with a different one.
  52. : The issue of source-level portability between Eiffel implementations
  53. : is being resolved, but binary-level portability seems to be a very
  54. : long way in the future.
  55.  
  56. It's not clear that 'binary portability' in a strict sense makes much
  57. sense in Eiffel: a generic class which uses combinations of old library
  58. code and new user-written code cannot just patch raw assembly together. 
  59.  
  60. The entire meaning of 'linking' depends profoundly on the language, and this 
  61. is my point.  
  62.  
  63. So system 'linkers' ought to have been made which can deal with this
  64. somehow, but they haven't.  Some might counter : "it's a 'people' issue, it 
  65. is the responsibility of the language not the operating system".
  66.  
  67. I disagree---if there had been standard technology widely available which
  68. could successfully link together things more sophisticated than C then the
  69. various new language people would have been much more motivated to adopt a
  70. real representation for doing so for every new language. 
  71.  
  72. I thus consider the design of the 'link model' for the Java VM 
  73. very important.  What are the concepts that it can represent?  I think it
  74. would be 
  75.  
  76. : Matt Austern
  77. : SGI: MTI Compilers Group
  78. : austern@isolde.mti.sgi.com
  79.